<!-- 车辆编制管理|delete:删除,edit:编辑,audit:审核,auditNew:审核新增,bind:绑定车辆,add:新增编制,approve:申请更新,auditUpdata:审核更新 -->
<div class="layui-col-xs6 layui-col-md12">
    <!-- 搜索框 -->
    <form class="layui-form" action="" style="margin-top:10px;">
        <div class="layui-form-item layui-col-md12 layui-col-xs12">
            <div class="layui-input-inline">
                <input type="hidden" name="company_id" value="{$Think.get.company_id}" placeholder="公司/单位" autocomplete="off" class="layui-input company_id">
                <input type="text" name="company_name" value="{$Think.get.company_name}" placeholder="司公/单位" lay-verify="required" autocomplete="off" class="layui-input company_name"
                    readonly>
            </div>
            <div class="layui-input-inline">
                <select name="strength_type" value="{$Think.get.strength_type}">
                    <option {$Think.get.strength_type==0?selected: ""} value="" selected>编制车型</option>
                    <option {$Think.get.strength_type==1?selected: ""} value="1">执法执勤用车</option>
                    <option {$Think.get.strength_type==2?selected: ""} value="2">特种专业技术用车</option>
                    <option {$Think.get.strength_type==3?selected: ""} value="3">机要通信用车</option>
                    <option {$Think.get.strength_type==4?selected: ""} value="4">应急保障用车</option>
                </select>
            </div>
            <div class="layui-input-inline">
                    <select name="state" value="{$Think.get.state}">
                        <option {$Think.get.state==0?selected: ""} value="" selected>审核状态</option>
                        <option {$Think.get.state==1?selected: ""} value="1">审核中</option>
                        <option {$Think.get.state==2?selected: ""} value="2">通过</option>
                        <option {$Think.get.state==3?selected: ""} value="3">拒绝</option>
                    </select>
                </div>
            <button class="layui-btn layui-btn-normal">
                <span>查询</span>
            </button>
            <button type="reset" class="layui-btn layui-btn-primary reset">重置</button>
        </div>
    </form>
    <!-- 车辆操作 -->
    <div>
        <div class="layui-btn-group" style="width: 100%;">
            <button class="layui-btn layui-btn-sm layui-btn-primary" id="add" data-btn="add">
                新增
            </button>
            <button class="layui-btn layui-btn-sm layui-btn-primary delete-multiple" data-btn='detail'>
                删除
            </button>
        </div>
    </div>
    <!-- 表单 -->
    <div class="table_margin_0">
        <table class="layui-hide" id="insurance" lay-filter="demo"></table>
    </div>
    <!-- 分页 -->
    <div id="page"></div>
</div>
</div>
<script type="text/html" id="demo1">
    {{# if(d.state == 1 ){ }}
    <a class="layui-btn layui-btn-xs layui-btn-orange" lay-event="auditNew" data-btn='auditNew'>审核新增</a>
    <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit" data-btn='edit'>编辑</a>
    {{# }else if(d.state ==2&&!d.car_id ){ }} 
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="bind" data-btn='bind'>绑定车辆</a>
    {{# }else if(d.state ==2&&d.car_id ){ }} 
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="approve" data-btn='approve'>申请更新配置</a>
    {{# }else if(d.state ==3 ){ }}
    <!-- <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit" data-btn='edit'>编辑</a> -->
    {{# }else if(d.state ==4 ){ }}
    <a class="layui-btn layui-btn-xs layui-btn-orange" lay-event="auditUpdata" data-btn='auditUpdata'>审核更新</a>
    {{# }else if(d.state ==5 ){ }}
    <a class="layui-btn layui-btn-xs layui-btn-orange" lay-event="auditUpdata" data-btn='auditUpdata'>审核更新</a>
    {{# }else if(d.state ==6 ){ }} 
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="updata" data-btn='updata'>更新配置</a>
    {{# }else if(d.state ==7 ){ }}
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="approve" data-btn='approve'>申请更新配置</a> 
    {{# } else { }}  {{# } }}
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="progress" data-btn='approve'>查看进度</a>
    <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit" data-btn='edit'>编辑</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" data-btn='detail'>删除</a>
</script>
<script type="text/html" id="demo">
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="progress" data-btn='progress'>查看进度</a>
    {{# if(d.state ==1 ){ }}
    <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit" data-btn='edit'>编辑</a>
    {{# } else { }}{{# } }}
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" data-btn='detail'>删除</a>
</script>
<script type="text/html" id="State"> 
    {{# if(d.state ==1 ){ }}
        审核中
    {{# }else if(d.state ==2 ){ }}
        新增审核通过
    {{# }else if(d.state ==3 ){ }}
        新增审核拒绝
    {{# }else if(d.state ==11 ){ }}
        资产审核中
    {{# }else if(d.state ==21 ){ }}
        行政审核中
    {{# }else if(d.state ==13 ){ }}
        资产拒绝更新
    {{# }else if(d.state ==22 ){ }}
        行政同意更新
    {{# }else if(d.state ==23 ){ }}
        行政拒绝更新
    {{# }else if(d.state ==99 ){ }}
        已绑定车辆
    {{# } else { }} 无状态 {{# } }}
</script>
<script type="text/html" id="carType"> 
    {{# if(JSON.parse(d.standard).car_type ==1 ){ }}
        大型客车
    {{# }else if(JSON.parse(d.standard).car_type ==2 ){ }}
        中型客车
    {{# }else if(JSON.parse(d.standard).car_type ==3 ){ }}
        小型客车
    {{# } else { }} - {{# } }}
</script>
<script type="text/html" id="strength"> 
    {{# if (d.strength_type == 1 ){ }}
        执法执勤用车
    {{# }else if (d.strength_type == 2 ){ }}
        特种专业技术用车
    {{# }else if (d.strength_type == 3 ){ }}
        机要通信用车
    {{# }else if (d.strength_type  == 4 ){ }}
        应急保障用车
    {{# } else { }} - {{# } }}
</script>